﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace PJ.Data
{
    [Serializable]
    [DataContract]
    public abstract class BaseEntityExtensionData : BaseEntityData, IEntityExtensionData
    {
        private string m_OwnerId;

        [DataMember]
        public string OwnerId
        {
            get { return m_OwnerId; }
            set { m_OwnerId = value; }
        }

        protected BaseEntityExtensionData()
        {
        }
        protected BaseEntityExtensionData(IEntityExtensionData data)
            : base(data)
        {
        }
        public override IObjectData Copy(IObjectData data)
        {
            base.Copy(data);
            this.OwnerId = ((IEntityExtensionData)data).OwnerId;
            return this;
        }
        public override bool IsEqual(IObjectData data)
        {
            if (base.IsEqual(data))
                if (((IEntityExtensionData)data).OwnerId == this.OwnerId)
                    return true;
            return false;
        }


    }
}
